|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.vtp.desktop.projects.core.FieldType
public class FieldType
This class encapsulates the possible data types of business object fields.
| Field Summary | |
|---|---|
static int |
ABSOLUTE
A bitwise flag indicating this field type has absolute precision |
static FieldType |
BOOLEAN
Declaration of a typical BOOLEAN field type. |
static FieldType |
DATETIME
Declaration of a typical DATETIME field type. |
static FieldType |
DECIMAL
Declaration of a typical DECIMAL field type. |
static int |
DOUBLE
A bitwise flag indicating this field type has double precision |
static FieldType |
NUMBER
Declaration of a typical NUMBER field type. |
static int |
SINGLE
A bitwise flag indicating this field type has single precision |
static FieldType |
STRING
Declaration of a typical STRING field type. |
| Constructor Summary | |
|---|---|
protected |
FieldType(java.lang.String typeName)
Creates a new FieldType with the given data type name. |
| Method Summary | |
|---|---|
static FieldType |
booleanArray()
Constructs a new FieldType that represents an array of boolean
values. |
static FieldType |
custom(java.lang.String typeName,
boolean object,
boolean array,
int precision)
Constructs a new FieldType from the complete definition provided
by the given data type name, object flag, array flag, and precision value. |
static FieldType |
dateTimeArray()
Constructs a new FieldType that represents an array of dates. |
static FieldType |
decimal(int precision)
Constructs a new FieldType that represents a decimal number with
the given precision. |
static FieldType |
decimalArray()
Constructs a new FieldType that represents an array of decimal
numbers. |
static FieldType |
decimalArray(int precision)
Constructs a new FieldType that represents an array of decimal
numbers that will have the given precision. |
int |
getPrecision()
|
java.lang.String |
getTypeName()
|
boolean |
hasPrecision()
Determines whether or not the precision value is applicable to this field type. |
boolean |
isArray()
|
boolean |
isObject()
Determines whether or not this field type represents a business object. |
static FieldType |
load(org.w3c.dom.Element element)
Constructs a new FieldType from the information stored in the
given XML DOM sturcture. |
static FieldType |
number(int precision)
Constructs a new FieldType that represents a number with
the given precision. |
static FieldType |
numberArray()
Constructs a new FieldType that represents an array of numbers. |
static FieldType |
numberArray(int precision)
Constructs a new FieldType that represents an array of numbers
that will have the given precision. |
static FieldType |
object(IBusinessObject objectType)
Constructs a new FieldType that represents a business object. |
static FieldType |
objectArray(IBusinessObject objectType)
Constructs a new FieldType that represents an array of
business objects. |
static FieldType |
stringArray()
Constructs a new FieldType that represents an array of strings. |
void |
write(org.w3c.dom.Element parent)
Generates the XML DOM elements and attributes required to save the information for this field type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final FieldType STRING
public static final FieldType NUMBER
public static final FieldType DECIMAL
public static final FieldType BOOLEAN
public static final FieldType DATETIME
public static final int SINGLE
public static final int DOUBLE
public static final int ABSOLUTE
| Constructor Detail |
|---|
protected FieldType(java.lang.String typeName)
FieldType with the given data type name. Style is
defaulted to no style flags and precision is defaulted to SINGLE.
typeName - The data type name of this field type| Method Detail |
|---|
public boolean hasPrecision()
true if this field type has a precision, false
otherwisepublic int getPrecision()
public boolean isObject()
true if this field type represents a business object,
false otherwisepublic boolean isArray()
true if this field type represents an array of things,
false otherwisepublic java.lang.String getTypeName()
public void write(org.w3c.dom.Element parent)
parent - The parent XML DOM element that will contain the field type informationpublic static FieldType number(int precision)
FieldType that represents a number with
the given precision.
precision - The precision of the number represented by the new field type
FieldTypepublic static FieldType numberArray()
FieldType that represents an array of numbers.
FieldTypepublic static FieldType numberArray(int precision)
FieldType that represents an array of numbers
that will have the given precision.
precision - The precision of the numbers contained in the array
represented by the new field type
FieldTypepublic static FieldType stringArray()
FieldType that represents an array of strings.
FieldTypepublic static FieldType dateTimeArray()
FieldType that represents an array of dates.
FieldTypepublic static FieldType decimal(int precision)
FieldType that represents a decimal number with
the given precision.
precision - The precision of the decimal number represented by the new
field type
FieldTypepublic static FieldType decimalArray()
FieldType that represents an array of decimal
numbers.
FieldTypepublic static FieldType decimalArray(int precision)
FieldType that represents an array of decimal
numbers that will have the given precision.
precision - The precision of the decimal numbers contained in the array
represented by the new field type
FieldTypepublic static FieldType booleanArray()
FieldType that represents an array of boolean
values.
FieldTypepublic static FieldType object(IBusinessObject objectType)
FieldType that represents a business object.
objectType - The definition of the business object type
FieldTypepublic static FieldType objectArray(IBusinessObject objectType)
FieldType that represents an array of
business objects.
objectType - The definition of the business object type the array
will contain
FieldType
public static FieldType custom(java.lang.String typeName,
boolean object,
boolean array,
int precision)
FieldType from the complete definition provided
by the given data type name, object flag, array flag, and precision value.
This function is capable of creating any possible field type.
typeName - The name of the data typeobject - true if this field type is an object, false otherwisearray - true if this field type is an array, false otherwiseprecision - The desired precision of the new field type
FieldTypepublic static FieldType load(org.w3c.dom.Element element)
FieldType from the information stored in the
given XML DOM sturcture. The information must be stored the same format
produced by the write() function of this class.
element - The element that contains the formated data
FieldType instance represented by the given
field type information
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||